/**
* All Rights Reserved , Copyright (C) 2020 , 青岛鼎信通讯股份有限公司
*
* MpmProjectSaleServiceAuto
* 项目信息（销售）
*
* 修改纪录
* 2020-12-25 版本：1.0 lanjianwei 创建。
* @version 版本：1.0
* @author 作者：lanjianwei
* 创建日期：2020-12-25
*/

package com.topscomm.mpm.service.impl.auto;

import javax.annotation.Resource;
import com.topscomm.basic.IBasicDao;
import com.topscomm.tap.common.DatacodeCache;
import java.util.Map;
import com.topscomm.mpm.*;
import com.topscomm.mpm.pojo.MpmProjectSaleEntity;
import com.topscomm.mpm.dao.IMpmProjectSaleDao;


public class MpmProjectSaleServiceAuto extends MpmService<MpmProjectSaleEntity,IMpmProjectSaleDao> {

	/**
	 * @author: lanjianwei
	 * @date: 2020-12-25
	 * @param mapRow
	 * @description:设置字段显示值
	 * @modify:
	 */
	@Override
	public void setDispFields(Map<String, Object> mapRow, DatacodeCache datacodeCache) {
		String temp;
		if (mapRow.get("enabled") != null) {
			temp = mapRow.get("enabled").toString();
			mapRow.put("dispenabled", datacodeCache.getValueDynamic("CboYesNo", temp, "code", "name"));
		}
		if (mapRow.get("purchasepattern") != null) {
			temp = mapRow.get("purchasepattern").toString();
			mapRow.put("disppurchasepattern", datacodeCache.getValueDynamic("MpmPurchasePattern", temp, "code", "name"));
		}
		if (mapRow.get("projectsource") != null) {
			temp = mapRow.get("projectsource").toString();
			mapRow.put("dispprojectsource", datacodeCache.getValueDynamic("ProjectSource", temp, "code", "name"));
		}
	}

	@Override
	@Resource(name = "mpmProjectSaleDao")
	public void setDao(IBasicDao<MpmProjectSaleEntity> dao) {
		super.setDao(dao);
	}
}
